package com.fir.my.batis.plus.controller;

import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.fir.my.batis.plus.entity.DetectionRl;
import com.fir.my.batis.plus.mapper.DetectionRlMapper;
import com.fir.my.batis.plus.mapper.YourRepository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * @author fir
 * @date 2024/5/24 9:29
 */

@RestController
@RequestMapping("/all")
public class ALlController {


    /**
     * 部门表 服务类
     */
    @Resource
    private DetectionRlMapper detectionRlMapper;
    @Resource
    private YourRepository yourRepository;


//    @DSTransactional
//    @RequestMapping("/list")
////    public Object upUp(){
////        List<Map<String, Object>> all = yourRepository.findAll();
//        return all;
//    }
    @DSTransactional
    @RequestMapping("/list1")
    public Object upUp1(){
        List<DetectionRl> detectionRls = detectionRlMapper.selectDetectionRlList(new DetectionRl());
        return detectionRls;
    }


}
